package com.zl.test;

import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;

/**
 * @author ZLL
 * @date create in 2018/04/27
 */
public class Main {
    public static void main(String[] args) {
        ParameterizedType parameterizedType =
                (ParameterizedType) ABServiceImpl.class.getGenericInterfaces()[0];


        Type type1 = parameterizedType.getActualTypeArguments()[0];
        Type genericType = parameterizedType.getActualTypeArguments()[1];

        System.out.println(genericType.getTypeName());

        System.out.println(genericType.getClass());


        System.out.println(type1.getTypeName());
        System.out.println(type1.getClass());
    }
}
